<?php
/**
 * 店铺信息模块
 * 
 * @author river_he@ewueang.com
 */
include_once(AMFPHP_BASE . "shared/util/MethodTable.php");
final class NpcService extends Kit_Service{
	/**
	 * 获取npc类资源
	 * 
	 * @param int $level 店铺等级
	 * @return array
	 */
	public function getNpcs($shopLevel){
		if(1 > $level){
			return $this->pack(101, 'arguments level error');	
		}
		$where = array();
		array_push($where, 'nLevel<='.$level);
		array_push($where, 'nOnShelf=1');
		$data = $this->getNpcMode()->getItems($where, '', 1, 10);
		return $this->pack(200, 'OK', $data);
	}
}
//end